<!--
 * @Author: Wushiqi
 * @Descripttion: 
 * @Date: 2020-07-27 23:37:14
 * @LastEditors: Wushiqi
 * @LastEditTime: 2020-09-01 23:37:39
-->
<template>
  <div class="userinfo">
    <navbar />
    <img src="@/assets/bannerTop_new.png" alt="" class="backImg">
    <user-detail :userInfo="mode" />
  </div>
</template>

<script>
import Navbar from '@/components/common/Navbar'
import userDetail from '@/components/userComponent/userDetail'
export default {
  components: { Navbar, userDetail },
  data() {
    return{
      mode: {}
    }
  },
  created() {
    this.getUserInfo()
  },
  methods: {
    async getUserInfo() {
      const res = await this.$http.get('/user/' + localStorage.getItem('id'))
      this.mode = res.data[0]
    }
  }
}
</script>

<style lang="scss" scoped>
.userinfo {
  .backImg {
    height: 110px;
    width: 100%;
  }
}

</style>